/*
 * fsys.h - playlist file manager and HAL DBus interface (add playlist mount device)
 *
 * Copyright (C) 2010-2011 Serge Begger
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef FSYS_H
#define FSYS_H

#include <QWidget>
#include <QTimer>
#include <QFileSystemModel>
#include <QStack>
#include "qcarpcdialog.h"

namespace Ui {
    class fsys;
}

class fsys : public QWidget
{
    Q_OBJECT

public:
    explicit fsys(QWidget *parent = 0);
    ~fsys();
    void addPath(QString);

private:
    Ui::fsys *ui;
    QFileSystemModel fsmodel;
    QStringList filter;

    void setDir(QString t_path, bool );
    QStack<QString> backPath;
    bool isHome;

    void addDirClicked(QString);
    void addClicked(QString);

signals:
    void addSource(QString);
    void fsysHide();
    void initPlay();
    void stopPlay();

private slots:
    void on_backButton_pressed();
    void on_addButton_pressed();
    void on_fsView_clicked(const QModelIndex & index);
    void on_backFolderButton_pressed();
    void on_backHomeButton_pressed();
    void on_pushButUp_pressed();
    void on_pushButDw_pressed();
};

#endif // FSYS_H
